import 'dart:convert';

BaseData baseDataFromJson(Map<String, dynamic> str) =>
    BaseData.fromJson(json.decode(str['data']));

String baseDataToJson(BaseData data) => json.encode(data.toJson());

class BaseData {
  BaseData({
    required this.code,
    required this.data,
  });

  int code;
  String data;

  factory BaseData.fromJson(Map<String, dynamic> json) => BaseData(
        code: json['code'],
        data: json['data'],
      );

  Map<String, dynamic> toJson() => {
        'code': code,
        'data': data,
      };
}
